package com.atguigu.utils;

import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

/**
 * 多切面的切入点顺序引用
 * @author 伟哥
 * @date 2021-05-01 18:55
 */
@Component
@Aspect
public class ABCValidateAspect {

    /**
     * 夸类，引入外部的，切入点表达式
     */
    @Before("com.atguigu.utils.LogUtils.hahaMyPoint()")
    public void  validateStart(){
        System.out.println("ValidateAspect前置通知");
    }

    @AfterReturning("com.atguigu.utils.LogUtils.hahaMyPoint()")
    public void  validateAfterReturning(){
        System.out.println("ValidateAspect返回通知");
    }

    @AfterThrowing("com.atguigu.utils.LogUtils.hahaMyPoint()")
    public void  validateException(){
        System.out.println("ValidateAspect异常通知");
    }

    @After("com.atguigu.utils.LogUtils.hahaMyPoint()")
    public void  validateEnd(){
        System.out.println("ValidateAspect最终通知");
    }
}